<% include header %>

<div class="container">
  <div class="ui two column centered grid">
    <div class="left floated left aligned four wide column">
      <% var name = this.session.user.name; %>
      <% include partials/userCard %>
      <% include partials/noReplyCard %>
      <% include partials/connectCard %>
    </div>
    <div class="right floated twelve wide column">
      <form method="post">
        <div class="ui form segment">
          <h2 style="margin-top:0">发表话题</h2>
          <div class="field">
            <div class="fields">
              <div class="field required">
                <label>版块</label>
                <div class="ui selection dropdown">
                  <input type="hidden" name="tab">
                  <div class="default text">版块</div>
                  <i class="dropdown icon"></i>
                  <div class="menu">
                    <% $app.tabs.slice(1).forEach(function (tab) { %>
                      <div class="item" data-value="<%= tab %>">
                        <%= tab %>
                      </div>
                    <% }) %>
                  </div>
                </div>
              </div>
            </div>
          </div>
          <div class="field required">
            <label>标题</label>
            <input placeholder="标题字数不少于10字" type="text" name="title">
          </div>
          <div class="field required">
            <label>内容</label>
            <textarea name="content"></textarea>
          </div>
          <input type="submit" class="ui button" value="发布">
        </div>
      </form>
    </div>
  </div>
</div>

<script type="text/javascript">
  $('.ui.dropdown').dropdown();
</script>

<% include footer %>